<?php echo $head ?>
<?php echo $b_head?>
<form action="" method="post" class="form form-horizontal">
    <div class="panel panel-default settings" style="display: block;">
        <div class="panel-heading">高级设置</div>
        <div class="panel-body">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">wap登录开关</label>
                <div class="col-sm-9">
                    <label><input type="radio" name="waplogin" value="0"> 关闭</label>
                    <label style="margin-left: 10px;"><input type="radio" name="waplogin" value="1"> 微信打开与wap登录同时开启</label>
                    <label style="margin-left: 10px;"><input type="radio" name="waplogin" value="2">
                        wap登录，微信禁止打开</label>
                    <label style="margin-left: 10px;"><input type="radio" name="waplogin" checked="checked"
                                                             value="3"> wap登录，微信也wap打开</label>
                    <span class="help-block">若关闭，则限制只能微信打开</span>
                    <span class="help-block">若选择‘微信打开与wap登录同时开启’，微信打开时按公众号版运营，非微信打开时使用wap登录</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">第三关付费复活次数</label>
                <div class="col-sm-9">
                    <input class="form-control" type="number" name="repaynum" value="2">
                    <div class="help-block">0或者不填代表不开启功能</div>
                    <div class="help-block">这里的次数代表 用户玩某个商品的游戏第三关失败时，可以付费复活的最大次数；当场游戏的累计次数;付费金额为商品游戏金额</div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">前端显示会员id</label>
                <div class="col-sm-9">
                    <label><input type="radio" name="ismid" checked="checked" value="0"> 隐藏</label>
                    <label style="margin-left: 10px;"><input type="radio" name="ismid" value="1"> 显示</label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">拉黑跳转链接</label>
                <div class="col-sm-9">
                    <input class="form-control" name="blackUrl" value="">
                    <div class="help-block">用户被拉黑后，打开口红游戏界面就自动跳转这个链接，不填则不跳转</div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">限定打开域名</label>
                <div class="col-sm-9">
                    <input class="form-control" name="limithost" value="">
                    <div class="help-block">不填则不限定，如果填了，该公众号应用只能用这些域名打开</div>
                    <div class="help-block">请填写纯域名，不要http，不要后面的/ 如果有多个域名，请以;(英文分号)隔开</div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">微博应用appkey</label>
                <div class="col-sm-9">
                    <div class="input-group">
                        <input class="form-control" name="wbappkey" value="">
                        <div class="input-group-btn" onclick="onCheck(this)"><a
                                class="btn btn-default">点击测试应用有效性</a></div>
                    </div>
                    <div class="help-block">该应用appkey是用于生成短链接使用的，请到<a style="color: blue;"
                                                                      href="http://open.weibo.com/" target="_blank">微博开放平台</a>申请应用
                    </div>
                    <div class="help-block">填写了之后，分销海报二维码将会使用微博短链接形式生成，可一定程度上保护分销海报二维码不会打不开</div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">开放平台模式</label>
                <div class="col-sm-9">
                    <label><input type="radio" name="isOpenWay" checked="checked" value="0"> 关闭</label>
                    <label style="margin-left: 10px;"><input type="radio" name="isOpenWay" value="1"> 开启</label>
                    <span class="help-block">开放平台模式必须绑定开放平台，否则会员将无法进入前端</span>
                    <span class="help-block">该功能可以用于变换公众号用法；当A公众号被封了之后，把A公众号的appid和秘钥换成B公众号的，程序可继续运行</span>
                    <span class="help-block">A、B公众号必须同时绑定在同一个开放平台上</span>
                    <span class="help-block">若已接入系统的公众号，必须在接入开放平台后，同步一次所有粉丝信息</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">假投诉功能</label>
                <div class="col-sm-9">
                    <label><input type="radio" name="report" value="0"> 关闭</label>
                    <label style="margin-left: 10px;"><input type="radio" name="report" checked="checked" value="1">
                        开启</label>
                    <span class="help-block">开启后，个人中心会出现一个投诉按钮</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">禁止PC端访问开关</label>
                <div class="col-sm-9">
                    <label><input type="radio" name="noweb" checked="checked" value="0"> 关闭</label>
                    <label style="margin-left: 10px;"><input type="radio" name="noweb" value="1"> 开启</label>
                    <span class="help-block">若开启，则用户无法在PC端访问</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">禁止PC端访问报错图</label>
                <div class="col-sm-9 col-xs-12">

                    <div class="input-group ">
                        <input type="text" name="face[weberror]"
                               value="../addons/junsion_winaward/public/img/error.png" class="form-control"
                               autocomplete="off">
                        <span class="input-group-btn">
				<button class="btn btn-default" type="button" onclick="showImageDialog(this);">选择图片</button>
			</span>
                    </div>
                    <div class="input-group " style="margin-top:.5em;">
                        <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片"
                            onclick="deleteImage(this)">×</em>
                    </div>
                    <div class="help-block">建议上传1024*768</div>
                </div>
            </div>
            <script type="text/javascript" src="../addons/junsion_winaward/public/js/SEARCH.js"></script>
            <div class="form-group choose choose_1">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">手机端发货会员</label>
                <div class="col-sm-9 col-xs-12">
                    <div>
                        <div class="input-group">
                            <input type="text" id="send_openid_text" name="send_openid_text" value=""
                                   class="form-control text" readonly="">
                            <input type="hidden" name="mids" id="mids" value="">
                            <div class="input-group-btn">
                                <button class="btn btn-primary" type="button" onclick="onMember();">选择会员</button>
                            </div>
                        </div>
                        <div class="input-group send-members" style="margin-top: 10px;">
                        </div>
                    </div>
                    <div class="help-block" style="color:red;">绑定的会员才有具有在手机端发货的权限</div>
                </div>
            </div>
            <script type="text/javascript">
                function onMember() {
                    SEARCH(2, '选择会员', '请输入会员昵称', ['会员昵称'], [], function (keyword, createdata) {
                        if (keyword == '') return [];
                        $.ajax({
                            url: './index.php?c=site&a=entry&op=getmem&do=mem&m=junsion_winaward',
                            type: 'post',
                            data: {keyword: keyword, mids: $('#mids').val()},
                            success: function (data) {
                                data = JSON.parse(data);
                                console.log(data);
                                var mdata = new Array();
                                $.each(data, function (k, v) {
                                    var arr = new Array();
                                    arr['id'] = v['id'];
                                    arr['list'] = [v['nickname']];
                                    arr['status'] = v['status'];
                                    mdata.push(arr);
                                });
                                createdata(mdata);
                            }
                        });
                    }, function (data) {
                        var uids = new Array();
                        var str = '';
                        $.each(data, function (k, v) {
                            var f = v['list'][0];
                            str += '<span style="margin-right: 5px;"><label onclick="onMDel(this)" data-id="' + v['id'] + '" class="label label-info">' + f + '</label></span>';
                            uids.push(v['id']);
                        });
                        $('.send-members').append(str);
                        var mids = $('#mids').val();
                        if (mids.length <= 0) {
                            var newmids = uids.join(",");
                        } else {
                            var newmids = mids + "," + uids.join(",");
                        }
                        $('#mids').val(newmids);
                    });
                }

                function onMDel(obj) {
                    $(obj).parent().remove();
                    var id = $(obj).attr('data-id');
                    var midsStr = $("#mids").val();
                    var midsArr = midsStr.split(",")
                    var index = midsArr.indexOf(id)
                    midsArr.splice(index, 1);
                    $('#mids').val(midsArr.join(","));
                }

            </script>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">会员等级升级提示语</label>
            <div class="col-sm-9">
                <input class="form-control" name="levelTip" value="">
                <div class="help-block">例如：恭喜您晋升为#title#，点击生成推广海报，分享给朋友，可获#red#的红包收益，#num#的游戏币收益。</div>
                <div class="help-block">#title#为等级名称占位符；#num#为返余额比例占位符；#red#为返佣金比例占位符</div>
                <div class="help-block">该提示语在等级设置中，设置了自动升级功能时才有效</div>
            </div>
        </div>
        <div class="panel-heading">每天余额领取功能</div>
        <div class="panel-body">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">每天可领取余额</label>
                <div class="col-sm-9">
                    <input class="form-control" name="give[credit]" value="">
                    <div class="help-block">每天可领取的余额，比如： 5； 如果想要随机值可以这样填： 1,5 代表随机领取1-5个余额；不填或者0代表关闭该功能</div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">领取成功提示语</label>
                <div class="col-sm-9">
                    <input class="form-control" name="give[stips]" value="">
                    <div class="help-block">领取成功后的提示语； #credit# 为他获得的余额的占位符；如： 恭喜你获得#credit#个游戏币</div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">重复领取提示语</label>
                <div class="col-sm-9">
                    <input class="form-control" name="give[ftips]" value="">
                    <div class="help-block">今天已经领取了，再领取的的提示语；例如：亲，你今天已经领取过了，明天再来吧</div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">每天余额领取的前端链接</label>
                <div class="col-sm-9">
                    <a id="giveurl" class="btn btn-default btn-sm"
                       data-url="http://域名/app/index.php?i=1&amp;c=entry&amp;do=give&amp;m=junsion_winaward">领取余额链接</a>
                </div>
            </div>
        </div>
        <div class="panel-heading">关注公众号设置</div>
        <div class="panel-body">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">引导关注公众号</label>
                <div class="col-sm-9">
                    <label><input type="radio" name="guide[status]" checked="checked" value="0"> 关闭</label>
                    <label style="margin-left: 10px;"><input type="radio" name="guide[status]" value="1">开启</label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">关注公众号链接</label>
                <div class="col-sm-9">
                    <input class="form-control" name="guide[url]" value="">
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">引导关注公众图</label>
                <div class="col-sm-9">

                    <div class="input-group ">
                        <input type="text" name="guide[pic]" value="" class="form-control" autocomplete="off">
                        <span class="input-group-btn">
				<button class="btn btn-default" type="button" onclick="showImageDialog(this);">选择图片</button>
			</span>
                    </div>
                    <div class="input-group " style="margin-top:.5em;">
                        <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片"
                            onclick="deleteImage(this)">×</em>
                    </div>
                    <div class="help-block">请上传300*50大小的图片</div>
                </div>
            </div>
        </div>
        <div class="panel-heading">用户中心广告设置</div>
        <div class="panel-body">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">广告链接</label>
                <div class="col-sm-9">
                    <input class="form-control" name="uadv[url]" value="">
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">广告图</label>
                <div class="col-sm-9">

                    <div class="input-group ">
                        <input type="text" name="uadv[pic]" value="" class="form-control" autocomplete="off">
                        <span class="input-group-btn">
				<button class="btn btn-default" type="button" onclick="showImageDialog(this);">选择图片</button>
			</span>
                    </div>
                    <div class="input-group " style="margin-top:.5em;">
                        <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片"
                            onclick="deleteImage(this)">×</em>
                    </div>
                    <div class="help-block">建议传300*100大小的图片</div>
                    <div class="help-block">不传广告图则不显示</div>
                </div>
            </div>
        </div>
        <div class="panel-heading">体验模式游戏难度设置</div>
        <div class="panel-body">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">注意</label>
                <div class="col-sm-9">
                    <div class="help-block">口红数必须大于0，建议输入小于或等于13的整数。例如6</div>
                    <div class="help-block">闯关时间必须大于0，例如30</div>
                    <div class="help-block">请依次设置游戏关卡</div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">第一关设置</label>
                <div class="col-sm-9">
                    <div class="input-group">
                        <span class="input-group-addon">口红数</span>
                        <input class="form-control" name="freegame[0][num]" type="number" value="6">
                        <span class="input-group-addon">条 难度</span>
                        <select class="form-control" name="freegame[0][hard]">
                            <option value="1" selected="">简单</option>
                            <option value="2">一般</option>
                            <option value="3">较难</option>
                            <option value="4">困难</option>
                            <option value="5">变态难</option>
                        </select>
                        <span class="input-group-addon">闯关时间</span>
                        <input class="form-control" name="freegame[0][time]" type="number" value="30">
                        <span class="input-group-addon">秒</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">第二关设置</label>
                <div class="col-sm-9">
                    <div class="input-group">
                        <span class="input-group-addon">口红数</span>
                        <input class="form-control" name="freegame[1][num]" type="number" value="10">
                        <span class="input-group-addon">条 难度</span>
                        <select class="form-control" name="freegame[1][hard]">
                            <option value="1" selected="">简单</option>
                            <option value="2">一般</option>
                            <option value="3">较难</option>
                            <option value="4">困难</option>
                            <option value="5">变态难</option>
                        </select>
                        <span class="input-group-addon">闯关时间</span>
                        <input class="form-control" name="freegame[1][time]" type="number" value="40">
                        <span class="input-group-addon">秒</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">体验模式关卡3默认图</label>
                <div class="col-sm-9">

                    <div class="input-group ">
                        <input type="text" name="third_pic" value="" class="form-control" autocomplete="off">
                        <span class="input-group-btn">
				<button class="btn btn-default" type="button" onclick="showImageDialog(this);">选择图片</button>
			</span>
                    </div>
                    <div class="input-group " style="margin-top:.5em;">
                        <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片"
                            onclick="deleteImage(this)">×</em>
                    </div>
                    <div class="help-block">104*94</div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">体验模式结束后引导按钮</label>
                <div class="col-sm-9">
                    <input class="form-control" name="freeguide[txt]" value="">
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">体验模式结束后引导按钮链接</label>
                <div class="col-sm-9">
                    <input class="form-control" name="freeguide[url]" value="">
                    <div class="help-block">引导链接不填或留空，则不显示</div>
                </div>
            </div>
        </div>
        <div class="panel-heading">自定义链接标识</div>
        <div class="panel-body">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">开关</label>
                <div class="col-sm-9">
                    <label><input type="radio" name="self[switch]" checked="checked" value="0"> 关闭</label>
                    <label style="margin-left: 10px;"><input type="radio" name="self[switch]" value="1"> 开启</label>
                    <span class="help-block">注意：该功能开启后，原旧链接将不可用，无法进入；只能用下方的新前端入口链接进入</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">php文件名</label>
                <div class="col-sm-9">
                    <input class="form-control" name="self[file]" value="t">
                    <span class="help-block">建议就一个字符</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">公众号平台ID</label>
                <div class="col-sm-9">
                    <input class="form-control" name="self[uniacid]" value="u">
                    <span class="help-block">建议就一个字符</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">行为名</label>
                <div class="col-sm-9">
                    <input class="form-control" name="self[do]" value="a">
                    <span class="help-block">建议就一个字符</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">路由文件下载</label>
                <div class="col-sm-9">
                    <a class="btn btn-default"
                       href="./index.php?c=site&amp;a=entry&amp;do=downfile&amp;m=junsion_winaward">点击下载路由文件</a>
                    <span class="help-block">如果每次更换了上面的文件名 行为名 id那些，需要重新保存参数后才会更新，然后重新下载路由文件，并放到系统根目录下app文件夹内</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">新前端入口链接</label>
                <div class="col-sm-9">
                    <a id="needCopy" class="btn btn-default btn-sm" data-url="http://域名/app/t.php?u=1&amp;a=index">首页</a>
                    <a id="needCopy1" class="btn btn-default btn-sm"
                       data-url="http://域名/app/t.php?u=1&amp;a=my">我的</a>
                    <a id="needCopy2" class="btn btn-default btn-sm" data-url="http://域名/app/t.php?u=1&amp;a=order">我的订单</a>
                    <a id="needCopy3" class="btn btn-default btn-sm" data-url="http://域名/app/t.php?u=1&amp;a=rouge">我的口红</a>
                    <a id="needCopy4" class="btn btn-default btn-sm" data-url="http://域名/app/t.php?u=1&amp;a=with">我要提现</a>
                    <a id="needCopy5" class="btn btn-default btn-sm"
                       data-url="http://域名/app/t.php?u=1&amp;a=mynext">我的下级</a>
                    <a id="needCopy6" class="btn btn-default btn-sm"
                       data-url="http://域名/app/t.php?u=1&amp;a=redlog">红包日志</a>
                    <a id="needCopy7" class="btn btn-default btn-sm"
                       data-url="http://域名/app/t.php?u=1&amp;a=mcredit">余额日志</a>
                    <a id="needCopy8" class="btn btn-default btn-sm"
                       data-url="http://域名/app/t.php?u=1&amp;a=rcredit">提现记录</a>
                    <a id="needCopy9" class="btn btn-default btn-sm" data-url="http://域名/app/t.php?u=1&amp;a=rank">排行榜</a>
                    <a id="needCopy10" class="btn btn-default btn-sm"
                       data-url="http://域名/app/t.php?u=1&amp;a=poster">推广海报</a>
                    <a id="needCopy11" class="btn btn-default btn-sm"
                       data-url="http://域名/app/t.php?u=1&amp;a=level">升级会员</a>
                    <span class="help-block">点击上面按钮进行复制链接</span>
                    <span class="help-block">该功能开启后，只能使用新链接进入；如果每次更换了上面的文件名 行为名 id那些，需要重新保存参数，然后重新复制入口链接</span>
                </div>
            </div>
        </div>
        <div class="panel-heading">私人定制功能不开放，请忽略</div>
        <div class="panel-body">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">UID</label>
                <div class="col-sm-9">
                    <input class="form-control" name="zhcash[uid]" value="">
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">KEY</label>
                <div class="col-sm-9">
                    <input class="form-control" name="zhcash[key]" value="">
                </div>
            </div>
        </div>
    </div>
    <button class="btn btn-primary" type="submit" name="submit" value="提交">提交</button>
</form>
</div>